import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String s = scan.nextLine();

        if(s.matches("[0-2][0-5][0-5]\\."+"[0-2][0-5][0-5]\\."+"[0-2][0-5][0-5]\\."+"[0-2][0-5][0-5]")) {
            System.out.println("yes");
        } else {
            System.out.println("no");
        }
    }
}